package com.csist.service.po.basicInfoModule.impl;

import com.csist.mapper.po.userModule.UserGroupMapper;
import com.csist.pojo.po.userModule.UserGroup;
import com.csist.service.po.basicInfoModule.UserGroupService;
import com.csist.util.SqlSessionUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.Collections;
import java.util.List;

/**
 * @ClassName UserGroupServiceImpl
 * @Description 【自行描述】
 * @Author cn
 * @Date 2024/6/29 下午5:11
 * @Version 1.0
 */
public class UserGroupServiceImpl implements UserGroupService {
    private SqlSession sqlSession;
    private UserGroupMapper userGroupMapper;

    public UserGroupServiceImpl() {
        sqlSession = SqlSessionUtil.openSession();
        userGroupMapper = sqlSession.getMapper(UserGroupMapper.class);
    }

    @Override
    public List<UserGroup> findAll() {
        List<UserGroup> list = userGroupMapper.findAll();
        if (list != null && list.size() > 0) {
            return list;
        }
        return null;
    }

    @Override
    public List<UserGroup> searchUserGroupByColumn(UserGroup userGroup) {
        return Collections.emptyList();
    }

    @Override
    public UserGroup getUserGroupById(int id) {
        return null;
    }
}
